home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / PC2Amiga / Samba / docs / textdocs / Faxing.txt < prev    next >
Text File  |  2000-04-25  |  6KB  |  223 lines

  1. !==
  2. !== Faxing.txt for Samba release 2.0.7 26 Apr 2000
  3. !==
  4. Contributor:    Gerhard Zuber <zuber@berlin.snafu.de>
  5. Date:            August 5th 1997.
  6. Status:            Current
  7.  
  8. Subject:        F A X I N G   with  S A M B A
  9. ==========================================================================
  10.  
  11. This text describes how to turn your SAMBA-server into a fax-server
  12. for any environment, especially for Windows.
  13.    Author: Gerhard Zuber <zuber@berlin.snafu.de>
  14.    Version: 1.4
  15.    Date: 04. Aug. 1997
  16.  
  17. Requirements:
  18.    UNIX box (Linux preferred) with SAMBA and a faxmodem
  19.    ghostscript package
  20.    mgetty+sendfax package
  21.    pbm package (portable bitmap tools)
  22.  
  23. FTP sites:
  24.    sunsite.unc.edu:/pub/Linux/system/Serial/mgetty+sendfax*
  25.    tsx-11.mit.edu:/pub/linux/sources/sbin/mgetty+sendfax
  26.    ftp.leo.org:/pub/comp/networking/communication/modem/mgetty/mgetty1.1.6-May05.tar.gz
  27.  
  28.    pbm10dec91.tgz
  29.    ftp.leo.org:/pub/comp/networking/communication/modem/mgetty/pbm10dec91.tgz
  30.    sunsite.unc.edu: ..../apps/graphics/convert/pbmplus-10dec91-bin.tar.gz
  31.    ftp.gwdg.de/pub/linux/grafik/pbmplus.src.tar.Z (this is 10dec91 source)
  32.                  or ???   pbm10dec91.tgz pbmplus10dec91.tgz
  33.  
  34.  
  35. making mgetty+sendfax running:
  36. ==============================
  37.  
  38.    go to source tree: /usr/src/mgetty+sendfax
  39.    cp policy.h-dist policy.h
  40.  
  41.    change your settings: valid tty ports, modem initstring, Station-Id
  42.  
  43. #define MODEM_INIT_STRING       "AT &F S0=0 &D3 &K3 &C1\\\\N2"
  44.  
  45. #define FAX_STATION_ID  "49 30 12345678"
  46.  
  47. #define FAX_MODEM_TTYS  "ttyS1:ttyS2:ttyS3"
  48.  
  49.    Modem initstring is for rockwell based modems
  50.    if you want to use mgetty+sendfax as PPP-dialin-server,
  51.    define AUTO_PPP in Makefile:
  52.  
  53. CFLAGS=-O2 -Wall -pipe -DAUTO_PPP
  54.  
  55.    compile it and install the package.
  56.    edit your /etc/inittab and let mgetty running on your preferred
  57.    ports:
  58.  
  59. s3:45:respawn:/usr/local/sbin/mgetty ttyS2 vt100
  60.  
  61.    now issue a
  62.       kill -HUP 1
  63.    and enjoy with the lightning LEDs on your modem
  64.    your now are ready to receive faxes !
  65.  
  66.  
  67.    if you want a PPP dialin-server, edit 
  68.       /usr/local/etc/mgetty+sendfax/login.config
  69.  
  70. /AutoPPP/ -     ppp     /usr/sbin/pppd auth debug passive modem 
  71.  
  72.  
  73.    Note: this package automatically decides between a fax call and
  74.          a modem call. In case of modem call you get a login prompt !
  75.  
  76. Tools for printing faxes:
  77. =========================
  78.  
  79.    your incomed faxes are in:
  80.     /var/spool/fax/incoming
  81.  
  82.    print it with:
  83.  
  84.      for i in *
  85.      do
  86.      g3cat $i | g3tolj | lpr -P hp
  87.      done
  88.  
  89.    in case of low resolution use instead:
  90.  
  91.      g3cat $i | g3tolj -aspect 2 | lpr -P hp
  92.  
  93.  
  94.    g3cat is in the tools-section, g3tolj is in the contrib-section
  95.    for printing to HP lasers.
  96.  
  97.    If you want to produce files for displaying and printing with Windows, use
  98.    some tools from the pbm-package like follow
  99.  
  100.      g3cat $i | g3topbm - |  ppmtopcx - >$i.pcx  
  101.  
  102.    and view it with your favourite Windows tool (maybe paintbrush)
  103.  
  104.  
  105. Now making the fax-server:
  106. ===========================
  107.  
  108.     fetch the file
  109.        mgetty+sendfax/frontends/winword/faxfilter
  110.  
  111.     and place it in
  112.  
  113.       /usr/local/etc/mgetty+sendfax/
  114.  
  115.     prepare your faxspool file as mentioned in this file
  116.     edit fax/faxspool.in and reinstall or change the final
  117.     /usr/local/bin/faxspool too.
  118.  
  119.             if [ "$user" = "root" -o "$user" = "fax" -o \
  120.                  "$user" = "lp" -o "$user" = "daemon" -o "$user" = "bin" ]
  121.  
  122.     find the first line and change the second.
  123.  
  124.     make sure you have pbmtext (from the pbm-package). This is
  125.     needed for creating the small header line on each page.
  126.     Notes on pbmplus:
  127.     Some peoples had problems with precompiled binaries (especially
  128.     at linux) with a shared lib libgr.so.x.x. The better way is
  129.     to fetch the source and compile it. One needs only pbmtext for
  130.     generating the small line on top of each page /faxheader). Install
  131.     only the individual programs you need. If you install the full
  132.     package then install pbmplus first and then mgetty+sendfax, because
  133.     this package has some changed programs by itself (but not pbmtext).
  134.  
  135.     make sure your ghostscript is functional. You need fonts !
  136.     I prefer these from the OS/2 disks
  137.  
  138.     prepare your faxheader
  139.       /usr/local/etc/mgetty+sendfax/faxheader
  140.  
  141.     edit your /etc/printcap file:
  142.  
  143. # FAX 
  144. lp3|fax:\
  145.         :lp=/dev/null:\
  146.         :sd=/usr/spool/lp3:\
  147.         :if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
  148.         :lf=/usr/spool/lp3/fax-log:
  149.  
  150.  
  151.  
  152.  
  153.     edit your /usr/local/samba/lib/smb.conf
  154.  
  155.     so you have a smb based printer named "fax"
  156.  
  157.  
  158. The final step:
  159. ===============
  160.  
  161.     Now you have a printer called "fax" which can be used via
  162.     TCP/IP-printing (lpd-system) or via SAMBA (windows printing).
  163.  
  164.     On every system you are able to produce postscript-files you
  165.     are ready to fax.
  166.  
  167.     On Windows 3.1 95 and NT:
  168.  
  169.     Install a printer wich produces postscript output,
  170.        e.g.  apple laserwriter
  171.  
  172.     connect the "fax" to your printer 
  173.  
  174.  
  175.     Now write your first fax. Use your favourite wordprocessor,
  176.     write, winword, notepad or whatever you want, and start
  177.     with the headerpage.
  178.  
  179.     Usually each fax has a header page. It carries your name,
  180.     your address, your phone/fax-number.
  181.  
  182.     It carries also the recipient, his address and his *** fax
  183.     number ***. Now here is the trick:
  184.  
  185.     Use the text:
  186.        Fax-Nr: 123456789
  187.     as the recipients fax-number. Make sure this text does not
  188.     occur in regular text ! Make sure this text is not broken
  189.     by formatting information, e.g. format it as a single entity.
  190.     (Windows Write and Win95 Wordpad are functional, maybe newer
  191.     versions of Winword are breaking formatting information).
  192.  
  193.     The trick is that postscript output is human readable and
  194.     the faxfilter program scans the text for this pattern and
  195.     uses the found number as the fax-destination-number.
  196.  
  197.     Now print your fax through the fax-printer and it will be
  198.     queued for later transmission. Use faxrunq for sending the
  199.     queue out.
  200.  
  201.     Notes of SAMBA smb.conf:
  202.     Simply use fall through from the samba printer to the unix
  203.     printer. Sample:
  204.  
  205.  
  206.  printcap name = /etc/printcap
  207.  print command = /usr/bin/lpr -r -P %p %s
  208.  lpq command = /usr/bin/lpq -P %p
  209.  lprm command = /usr/bin/lprm -P %p %j
  210.  
  211.  
  212. [fax]
  213.     comment = FAX (mgetty+sendfax)
  214.     path = /tmp
  215.     printable = yes
  216.     public = yes
  217.     create mode = 0700
  218.     browseable = yes
  219.     guest ok = no
  220.  
  221.  
  222.  
  223.